package com.yqg.manage.service.impl;

import com.yqg.manage.entity.ArchiveBranchNode;
import com.yqg.manage.mapper.ArchiveBranchNodeMapper;
import com.yqg.manage.service.IArchiveBranchNodeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ArchiveBranchNodeServiceImpl 服务实现类
 * @author zxf
 * @since 2024-04-30
 */
@Service
public class ArchiveBranchNodeServiceImpl extends ServiceImpl<ArchiveBranchNodeMapper, ArchiveBranchNode> implements IArchiveBranchNodeService {

    @Autowired
    ArchiveBranchNodeMapper archiveBranchNodeMapper;

    @Override
    public List<ArchiveBranchNode> findNextNode(Integer routineTypeId, Integer archiveNodeId) {
//        if (routineTypeId == 1) {
            return archiveBranchNodeMapper.findSimpleProgramNextNode(archiveNodeId);
//        } else {
//            return archiveBranchNodeMapper.findOtherProgramNextNode(archiveNodeId);
//        }
    }

    @Override
    public List<ArchiveBranchNode> findLastNode(Integer routineTypeId, Integer archiveNodeId) {
//        if (routineTypeId == 1) {
            return archiveBranchNodeMapper.findSimpleProgramLastNode(archiveNodeId);
//        } else {
//            return archiveBranchNodeMapper.findOtherProgramLastNode(archiveNodeId);
//        }
    }
}
